package annotation03;

import annotation03.MyAnnotation;

/**
 * ClassName: Person
 * Package: annotation03
 * Description:
 *
 * @Author 刘英杰
 * @Create 2025/2/3 22:27
 * @Version 1.0
 */

@MyAnnotation("张三")
public class Person {
    //@MyAnnotation("李四")//由于指定了@Target,只能用在类接口以及方法上,用在字段上直接编译报错
    private int age;


    @MyAnnotation(value="老王",color = Color.GREEN)
    public int getAge() {
        return age;
    }


    public void setAge(int age) {
        this.age = age;
    }
}
